package com.zhixiang.xaec.entity.system;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.cfg.Comment;

import com.googlecode.jsonplugin.annotations.JSON;


@Entity
@Table(name="sys_app_staff")
@Comment("人员")
public class Staff implements Serializable
{

    private static final long serialVersionUID = 6286930096390831883L;

    @Id
    @Comment("ID")
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long id;
    
    @Comment("名字")
    private String name;
    
    @Comment("工号")
    private String cardNo;
    
    @Comment("性别")
    private Integer title;

    @Comment("邮箱")
    private String email;
    
    @Comment("联系电话")
    private String phone;

    @Comment("手机号码")
    private String mobile;

    @Comment("传真")
    private String fax;

    @Comment("家庭住址")
    private String address;
    
    @Comment("照片")
    private String photo;

    @Comment("入职时间")
    private Date accessionTime;

    @Comment("状态")
    private Short status;

    @Comment("受教育程度")
    private String education;
    
   /* @Comment("部门")
    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name="dept_id", referencedColumnName="depId")
    private Department department;*/


    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public Integer getTitle()
    {
        return title;
    }

    public void setTitle(Integer title)
    {
        this.title = title;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getMobile()
    {
        return mobile;
    }

    public void setMobile(String mobile)
    {
        this.mobile = mobile;
    }

    public String getFax()
    {
        return fax;
    }

    public void setFax(String fax)
    {
        this.fax = fax;
    }

    public String getAddress()
    {
        return address;
    }

    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getPhoto()
    {
        return photo;
    }

    public void setPhoto(String photo)
    {
        this.photo = photo;
    }

    @JSON(format="yyyy-MM-dd")
    public Date getAccessionTime()
    {
        return accessionTime;
    }

    public void setAccessionTime(Date accessionTime)
    {
        this.accessionTime = accessionTime;
    }

    public Short getStatus()
    {
        return status;
    }

    public void setStatus(Short status)
    {
        this.status = status;
    }

    public String getEducation()
    {
        return education;
    }

    public void setEducation(String education)
    {
        this.education = education;
    }

    public String getCardNo()
    {
        return cardNo;
    }

    public void setCardNo(String cardNo)
    {
        this.cardNo = cardNo;
    }

    @Override
    public String toString()
    {
        return "Staff [id=" + id + ", name=" + name + ", cardNo=" + cardNo + ", title=" + title
               + ", email=" + email + ", phone=" + phone + ", mobile=" + mobile + ", fax=" + fax
               + ", address=" + address + ", photo=" + photo + ", accessionTime=" + accessionTime
               + ", status=" + status + ", education=" + education + "]";
    }

}
